package com.swas.util;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class ResultVO {

    private Integer code;
    private String message;
    private Object data;

    public static ResultVO success(){
        return new ResultVO(200, null, null);
    }
    public static ResultVO success(String message, Object data){
        return new ResultVO(200, message, data);
    }
    public static ResultVO success(Object data){
        return new ResultVO(200, null, data);
    }
    public static ResultVO success(String message){
        return new ResultVO(200, message, null);
    }
    public static ResultVO fail(String message){
        return new ResultVO(500, message, null);
    }
    public static ResultVO noAuth(String message){
        return new ResultVO(403, message, null);
    }

}
